package com.example.h2o.sqlitedemo3.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.h2o.sqlitedemo3.R;
import com.example.h2o.sqlitedemo3.sql.MyDatabase;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button btSql = findViewById(R.id.bt_sql);
        btSql.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                MyDatabase myDatabase = new MyDatabase(MainActivity.this);
                myDatabase.insert();
            }
        });
    }
}
